//
//  TLConnection.h
//  WebViewPreload
//
//  Created by tianlong on 2018/2/12.
//  Copyright © 2018年 tianlong. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "TLProtocol.h"

@interface TLConnection : NSObject

/** Current request. */
@property (strong, nonatomic) NSURLRequest *request;
@property (assign, nonatomic) id<TLConnectionDelegate> delegate;
@property (strong, nonatomic) NSOperationQueue* delegateQueue;
@property (assign, nonatomic) BOOL supportHTTPRedirection;

+ (BOOL)canInitWithRequest:(NSURLRequest *)request;
- (instancetype)initWithRequest:(NSURLRequest *)aRequest delegate:(id<TLConnectionDelegate>)delegate delegateQueue:(NSOperationQueue *)queue;
- (void)startLoading;
- (void)stopLoading;
@end
